package org.springblade.modules.opcua.kit;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.*;

/**
 * 工具
 */
public class WorkUtil {

    /**
     * 线程池
     */
    private static ExecutorService es = new ThreadPoolExecutor(120, 1000, 0L, TimeUnit.MILLISECONDS, new LinkedBlockingQueue<Runnable>());


    /**
     * 执行任务
     *
     * @param runnable
     */
    public static void submit(Runnable runnable) {
        es.submit(runnable);
    }

    /**
     * 执行任务
     *
     * @param callable
     * @param <T>
     * @return
     */
    public static <T> Future<T> submit(Callable<T> callable) {
        return es.submit(callable);
    }


}
